<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="./css/edit.css">
    <title>Title</title>
</head>

<body>
<div id="div_container">
    <div id="div_fruit_list">
        <p class="center f30">编辑库存信息</p>
        <form th:action="@{/fruit.do}" method="post" th:object="${fruit}">
            <input type="hidden" name="operate" value="update">
<!--            隐藏域：功能类似于文本框，它的值会随着表单的发送也会发送给服务器，但是界面上用户看不到-->
            <input type="hidden" name="fid" th:value="*{fid}"/>
        <table id="tbl_fruit">
            <tr>
                <th class="w20">名称:</th>
                <td><input type="text" name="fname" th:value="*{fname}"></td>
            </tr>
            <tr>
                <th class="w20">单价:</th>
                <td><input type="text" name="price" th:value="*{price}"></td>
            </tr>
            <tr>
                <th class="w20">库存：</th>
                <td><input type="text" name="fcount" th:value="*{fcount}"></td>
            </tr>
            <tr>
                <th class="w20">备注:</th>
                <td><input type="text" name="remark" th:value="*{remark}"></td>
            </tr>
            <tr>
                <th colspan="2">

                    <input type="submit" value="修改">
                </th>

            </tr>

        </table>
        </form>
    </div>
</div>
</body>
</html>